/**
 * Created by aa on 2016/8/25.
 */

'use strict';
let Redux=require('redux');
let utils=require('../common/utils.js');
let cr=utils.cr;
let actions=require('../actions/products');

var reducers=Redux.combineReducers({
    //轮播1
    tab1SliderItems:cr([],{[actions.RECEIVE_TAB1_SLIDER_ITEMS](state,action){
        return action.tab1SliderItems;
    }
    }),
    //固收
    regularProfitProducts:cr([],{[actions.RECEIVE_REGULAR_PROFIT_PRODUCTS](state,action){
        return action.regularProfitProducts;
    }
    }),
    //浮动
    floatProfitProducts:cr([],{[actions.RECEIVE_FLOAT_PROFIT_PRODUCTS](state,action){
        return action.floatProfitProducts;
    }
    }),
    //固收+浮动
    regularAndFloatProfitProducts:cr([],{[actions.RECEIVE_REGULARANDFLOAT_PROFIT_PRODUCTS](state,action){
        return action.regularAndFloatProfitProducts;
    }
    }),
    //公募基金
    raiseFunds:cr([],{[actions.RECEIVE_RAISEFUNDS](state,action){
        return action.raiseFunds;
    }
    })
});

module.exports=reducers;